Display multiple enumerated values in single line

Is there something that I can add to the display that will display all of the multiple enumerated values from a single object in a single line?

Display portion of my script:

       Buffer buff1 = create
       diff(buff1, a, b, "\\cf1\\strike ", "\\cf3\\ul ")
       displayRichWithColour  (ATTRS[i] ":  "   tempStringOf buff1)
       delete buff1

Question: Some of the attributes (that are display in the dxl column) have multiple enumerated values and I would like these value displayed in a single line with or without commas separating them.  Is this possible, and if so what do I add and where?


PatRoof - Mon Nov 10 17:17:30 EST 2014

Re: Display multiple enumerated values in single line
Mathias Mamsch - Tue Nov 11 03:32:09 EST 2014

I would add a check for the attribute type of the attributes you are comparing for multi enum attributes. Something like this:

Module mA = current // use your module handle for attribute A here 
Module mB = current // use your module handle for attribute B here
string sNameA = "Created Thru"  // use your attribute names here
string sNameB = "Created Thru"  // use your attribute names here


AttrDef adA = find (mA, sNameA )
AttrType atA = adA.type

AttrDef adB = find (mB, sNameB )
AttrType atB = adB.type

bool isMultiA = adA.multi
bool isMultiB = adB.multi
bool bReplaceLinebreaks = false

// Check if we are comparing to multi enum types ...
if ((stringOf atA.type) == (stringOf atB.type) /* both types are enums */ &&
    (stringOf atA.type) == "Enumeration"                                  && 
    (isMultiA && isMultiB)                     /* both are multi value */
   ) {
   bReplaceLinebreaks = true
}



Then look for a string replace function in the forum (there should be multiple) and do before you compare the values:

if (bReplaceLinebreaks) {
     a = replace (a, "\n", ",")
     b = replace (b, "\n", ",")
}

Maybe that helps, regards, Mathias